package net.sf.nlp.ltag.parser.dot;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import net.sf.nlp.ltag.data.LTAGTree;
import net.sf.nlp.ltag.parser.LTAGState;
import net.sf.nlp.ltag.parser.ParserTree;

public class DotAlg extends DotAlgAbstract
{
	protected static Logger logger =  Logger.getLogger(DotAlg.class);
		
	public DotAlg(Map<String, List<LTAGTree>> ltagMap)
	{
		super(ltagMap);		
	}
	
	public List<ParserTree> calculate() throws Exception
	{
		matchedStates.clear();
		
		List<LTAGState> stateSet = getInitStateSet();
		
		calculateTask(stateSet);
		
		List<ParserTree> parserTrees = getParsedTree(matchedStates);
		
		return parserTrees;
	}
}
